package com.jiang.daily.Q2109;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/03/30 11:07
 */
class Solution {
    public String addSpaces(String s, int[] spaces) {
        StringBuilder sb = new StringBuilder(s);
        int cnt = 0;
        for (int p: spaces) {
            sb.insert(p + cnt++, ' ');
        }
        return sb.toString();
    }
}
